Matthias Clasen [Wed, 17 Mar 2021 11:50:24 +0000 (07:50 -0400)]
sizerequest: Avoid a corner case
gcc 11 warns that the code isn't safe when
n_requested_sizes is 0. Add a precondition check
to make it clear that that never happens.
Matthias Clasen [Wed, 17 Mar 2021 11:49:06 +0000 (07:49 -0400)]
cssshadowvalue: Handle error condition propertly
We were parsing off the end of our array before noticing
that we've gone too far. gcc 11 warns about this.
Matthias Clasen [Wed, 17 Mar 2021 11:37:33 +0000 (07:37 -0400)]
checkbutton: Add a warning about cyclic groups
Setting up check or toggle button group relationships
in a cycle will lead to lockups. Add a warning about
this, and catch the simplest case with a precondition
check.
Fixes: #3763
Matthias Clasen [Tue, 16 Mar 2021 21:22:45 +0000 (17:22 -0400)]
Drop the gtk-doc subproject
No longer used.
Balázs Úr [Tue, 16 Mar 2021 23:49:27 +0000 (23:49 +0000)]
Update Hungarian translation
Matthias Clasen [Tue, 16 Mar 2021 19:12:05 +0000 (19:12 +0000)]
Merge branch 'matthiasc/for-master' into 'master'
dnd: Add some warnings to the docs
See merge request GNOME/gtk!3305
Matthias Clasen [Tue, 16 Mar 2021 18:24:04 +0000 (14:24 -0400)]
dnd: Add some warnings to the docs
Add some warnings about pitfalls of the async dnd api.
Matthias Clasen [Tue, 16 Mar 2021 11:43:06 +0000 (11:43 +0000)]
Merge branch 'kjellahl/cairo-subproject' into 'master'
Fix build when cairo is a subproject
See merge request GNOME/gtk!3304
Kjell Ahlstedt [Tue, 16 Mar 2021 08:52:13 +0000 (09:52 +0100)]
meson: Find libcairo-script-interpreter when cairo is a subproject
If cairo is a subproject, it's not necessarily installed when gtk
is built. In the build tree, libcairo-script-interpreter is not stored
in the same directory as other cairo libraries.
Kjell Ahlstedt [Tue, 16 Mar 2021 08:51:40 +0000 (09:51 +0100)]
gdkglcontext-x11: Don't assume that cairo-xlib.h is in cairo directory
If cairo is a subproject, it's not necessarily installed when gtk
is built. In the source tree, cairo's headers are not stored in
a directory called 'cairo'.
Matthias Clasen [Mon, 15 Mar 2021 22:32:23 +0000 (22:32 +0000)]
Merge branch 'fix-3581' into 'master'
gdkcursor-win32.c: Add cursor map for all-scroll (issue #3581)
Closes #3581
See merge request GNOME/gtk!3298
Matthias Clasen [Mon, 15 Mar 2021 22:31:08 +0000 (22:31 +0000)]
Merge branch 'fix-wayland-layout-changes' into 'master'
Fix wayland layout changes
See merge request GNOME/gtk!3303
Matthias Clasen [Mon, 15 Mar 2021 19:23:00 +0000 (15:23 -0400)]
wayland: Fix cross-layout accelerators
GTK traditionally lets you activate keyboard shortcuts
even if they are for a non-active layout. But it is meant
to only activate with a keysym from a non-active layout
when that symbol is not present in the current layout.
That last condition was lost when key event handling
was redone for GTK4. Bring it back.
Matthias Clasen [Mon, 15 Mar 2021 16:55:44 +0000 (12:55 -0400)]
wayland: Add debug spew for active keyboard layouts
Print out what we think the active keyboard layout is,
when it changes, with GDK_DEBUG=input.
Matthias Clasen [Mon, 15 Mar 2021 19:28:17 +0000 (19:28 +0000)]
Merge branch 'issue-3757' into 'master'
docs: Update annotations for WidgetClass.query_action()
Closes #3757
See merge request GNOME/gtk!3301
Matthias Clasen [Mon, 15 Mar 2021 16:34:23 +0000 (12:34 -0400)]
wayland: Emit keys-changed on layout changes
We were forgetting to do this in when layout changes are
communicated via handle_modifiers.
Emmanuele Bassi [Mon, 15 Mar 2021 13:48:35 +0000 (13:48 +0000)]
docs: Update annotations for WidgetClass.query_action()
The parameter_type and property_name out arguments can be set to NULL.
Fixes: #3757
Milo Casagrande [Mon, 15 Mar 2021 09:25:11 +0000 (09:25 +0000)]
Update Italian translation
(cherry picked from commit
affeff5472868b797b6ab16a9ffa6cab74148106)
Chun-wei Fan [Mon, 15 Mar 2021 09:04:21 +0000 (17:04 +0800)]
gdkcursor-win32.c: Add cursor map for all-scroll
This makes sure that we don't have cursors disappearing on Windows upon
scrolling because we can't find a cursor that exists on the system during
a scroll, and unlike GTK-3.x, we do not default to the arrow pointer on GTK4.
Just mimic what we have on X11 and Wayland: the trusty standard arrow pointer.
Fixes issue #3581.
Matthias Clasen [Mon, 15 Mar 2021 03:33:10 +0000 (23:33 -0400)]
release-script: Actually compress the docs tarball
Somehow an x got lot and the tarball got very big. Oops...
Benjamin Otte [Mon, 15 Mar 2021 02:31:45 +0000 (02:31 +0000)]
Merge branch 'wip/otte/for-master' into 'master'
Wip/otte/for master
See merge request GNOME/gtk!3297
Benjamin Otte [Mon, 15 Mar 2021 02:16:50 +0000 (03:16 +0100)]
x11: Don't call _gdk_surface_update_size() all the time
We were calling _gdk_surface_update_size() every frame, even if the
window size didn't change. This would cause us to discard all cached
buffers and redraw the whole screen.
This was BAD.
Benjamin Otte [Mon, 15 Mar 2021 01:56:28 +0000 (02:56 +0100)]
surface: Remove unused gdk_surface_get_unscaled_size()
Also remove unscaled_width/height members in the win32 backend.
Both of those are unused.
Matthias Clasen [Sun, 14 Mar 2021 23:13:10 +0000 (19:13 -0400)]
4.1.2
Matthias Clasen [Mon, 15 Mar 2021 01:35:44 +0000 (21:35 -0400)]
Update release script
With gi-docgen based docs, we can try to go back to
including the docs in the main release tarball.
Matthias Clasen [Mon, 15 Mar 2021 01:27:45 +0000 (01:27 +0000)]
Merge branch 'menubar-accel' into 'master'
window: Add a way to disable F10 shortcut
Closes #3727
See merge request GNOME/gtk!3296
Benjamin Otte [Tue, 9 Mar 2021 20:05:49 +0000 (21:05 +0100)]
ngl: Remove duplicate check
We check the extents, so there's no need to check overlap before.
Matthias Clasen [Sun, 14 Mar 2021 23:37:11 +0000 (19:37 -0400)]
window: Add a way to disable F10 shortcut
This is needed for terminal emulators.
Fixes: #3727
Matthias Clasen [Sun, 14 Mar 2021 21:04:37 +0000 (21:04 +0000)]
Merge branch 'ngl-less-shaders' into 'master'
Assorted ngl improvements
See merge request GNOME/gtk!3295
Matthias Clasen [Sun, 14 Mar 2021 04:30:18 +0000 (23:30 -0500)]
ngl: Special-case css backgrounds
Recognize a common pattern: A rounded clip with
a color node, followed by a border node, with the
same outline. This is what CSS backgrounds frequently
produce, and we can render it more efficiently with
a combined shader.
Matthias Clasen [Sat, 13 Mar 2021 23:40:37 +0000 (18:40 -0500)]
ngl: Don't bother with uniform border nodes
Now that colors aren't uniforms anymore, we don't
win much by using the inset_shadow shader. The fragment
shaders of inset_shadow and border are identical. And
the regular border setup does nine-slicing.
Matthias Clasen [Sat, 13 Mar 2021 23:21:45 +0000 (18:21 -0500)]
ngl: Small shader improvements
Add a variant of gskSetOutputColor that saves a
few multiplications, and use it where possible.
Matthias Clasen [Sat, 13 Mar 2021 23:04:26 +0000 (18:04 -0500)]
ngl: Improve the coloring shader
Since we are now passing a float anyway, we can avoid
the branch in the fragment shader.
Matthias Clasen [Sat, 13 Mar 2021 22:54:15 +0000 (17:54 -0500)]
ngl: Improve the gradient shaders
Use a define for MAX_COLOR_STOPS, and give the loop
a fixed limit.
Matthias Clasen [Sat, 13 Mar 2021 19:36:03 +0000 (14:36 -0500)]
ngl: Rewrite gsk_ngl_render_job_visit_text_node
Make this more compact, and thus easier to read.
Matthias Clasen [Sat, 13 Mar 2021 19:29:34 +0000 (14:29 -0500)]
ngl: Drop gsk_ngl_render_job_set_color
Colors are not state that we carry across draw ops,
so setting the color on the render job doesn't make
much sense. Instead, pass the color to the various
draw calls. Add a few new ones for that purpose.
Also, shorten the names of some by going from
'load_vertices_from_offscreen' to 'draw_offscreen'.
Matthias Clasen [Sat, 13 Mar 2021 18:40:04 +0000 (13:40 -0500)]
ngl: Refactor gsk_ngl_render_job_visit_border_node
With color sorting out of the picture, this can
be much simpler.
Matthias Clasen [Sat, 13 Mar 2021 15:17:34 +0000 (10:17 -0500)]
ngl: Consistently use gsk_scaled_premultiply
Its not going to make much of a difference, but we
can just as well be consistent.
Matthias Clasen [Sun, 14 Mar 2021 04:38:54 +0000 (23:38 -0500)]
ngl: Fix up uniform enums
This got messed up when color was changed from
a uniform to an attribute in
06d5c8e72dee3d6339.
Jiri Grönroos [Sun, 14 Mar 2021 17:02:46 +0000 (17:02 +0000)]
Update Finnish translation
(cherry picked from commit
f5a34b53afed6f75a257c21dc52b07592ea76681)
Guillaume Bernard [Sun, 14 Mar 2021 13:37:57 +0000 (13:37 +0000)]
Update French translation
(cherry picked from commit
21039681d6df9824599d186934aaa53fd4ba722f)
Piotr Drąg [Sun, 14 Mar 2021 12:30:26 +0000 (13:30 +0100)]
Update Polish translation
Marek Černocký [Sun, 14 Mar 2021 08:28:17 +0000 (09:28 +0100)]
Updated Czech translation
Matthias Clasen [Sat, 13 Mar 2021 22:27:04 +0000 (22:27 +0000)]
Merge branch 'gles-coloring' into 'master'
ngl: Fix the coloring shader on GLES 2.0
See merge request GNOME/gtk!3294
Emmanuel Gil Peyrot [Sat, 13 Mar 2021 22:00:54 +0000 (22:00 +0000)]
ngl: Fix the coloring shader on GLES 2.0
Integer varyings didn’t exist in GLSL ES 1.00, neither did the flat
attribute.
Kjartan Maraas [Sat, 13 Mar 2021 16:04:48 +0000 (16:04 +0000)]
Update Norwegian Bokmål translation
(cherry picked from commit
70ee21db71e5b8de0aff406d3d9f1decddebfa09)
Matthias Clasen [Sat, 13 Mar 2021 12:36:56 +0000 (12:36 +0000)]
Merge branch 'ebassi/for-master' into 'master'
docs: Fix the dependencies links
See merge request GNOME/gtk!3284
Matthias Clasen [Sat, 13 Mar 2021 12:33:15 +0000 (12:33 +0000)]
Merge branch 'ngl-textview-cursor' into 'master'
Ngl textview cursor
See merge request GNOME/gtk!3292
Matthias Clasen [Sat, 13 Mar 2021 00:44:31 +0000 (19:44 -0500)]
textview: Fix blinking block cursors
When we have a block cursor, we need to discard the
cached node of the line containing the cursor, in order
to get a blinking cursor.
Matthias Clasen [Sat, 13 Mar 2021 00:44:31 +0000 (19:44 -0500)]
textview: Fix blinking block cursors
When we have a block cursor, we need to discard the
cached node of the line containing the cursor, in order
to get a blinking cursor.
Matthias Clasen [Sat, 13 Mar 2021 00:28:36 +0000 (19:28 -0500)]
textlayout: Render cursors at the end
Don't place the insertion cursor render nodes in the
middle of the text nodes for all the text. This helps
the renderer batching the text draw calls together.
Matthias Clasen [Fri, 12 Mar 2021 23:26:15 +0000 (18:26 -0500)]
ngl: Fix up some debug printouts
Matthias Clasen [Fri, 12 Mar 2021 22:55:00 +0000 (22:55 +0000)]
Merge branch 'wip/chergert/fewer-uniforms' into 'master'
ngl: apply fewer uniforms
See merge request GNOME/gtk!3289
Matthias Clasen [Fri, 12 Mar 2021 22:51:16 +0000 (22:51 +0000)]
Merge branch 'pgriffis/readme-fixes' into 'master'
readme: Fix broken doc links
See merge request GNOME/gtk!3291
Patrick Griffis [Fri, 12 Mar 2021 22:02:55 +0000 (22:02 +0000)]
readme: Fix broken doc links
Matthias Clasen [Fri, 12 Mar 2021 21:26:52 +0000 (21:26 +0000)]
Merge branch 'ngl-vertex-attributes' into 'master'
Ngl vertex attributes
See merge request GNOME/gtk!3290
Matthias Clasen [Fri, 12 Mar 2021 19:25:05 +0000 (14:25 -0500)]
ngl: Identify shaders
Add a comment with a name to each shader. That makes
identifying the shaders in apitrace much easier.
Christian Hergert [Fri, 12 Mar 2021 19:47:15 +0000 (11:47 -0800)]
ngl: reintroduce comparison checks
This reduces how many changes we make when recording uniform state, which
increases the chances that the data offset will be the same when applying
uniforms.
Christian Hergert [Fri, 12 Mar 2021 18:16:52 +0000 (10:16 -0800)]
ngl: add front cache to reduce uniform changes
Since we make full snapshots when recording uniform state of batches, we
need to perform some deduplication to avoid so many repeated uniform calls.
This uses a closed hashtable to determine if we are likely changing the
value to something new.
This does not currently compare values, it instead only compares that we
are going to point at a new offset into the uniform buffer. We could go
further if we compare upon updating values (we did that early on in the
prototype) so that offsets are less likely to be changed.
Matthias Clasen [Fri, 12 Mar 2021 06:44:05 +0000 (01:44 -0500)]
gtk-demo: Add a test for scrolling with Emoji
Make a text with lots of Emoji and text. This
is exercising the GL renderers switching between
different shaders for color and plain glyphs.
Matthias Clasen [Fri, 12 Mar 2021 06:27:19 +0000 (01:27 -0500)]
ngl: Make the coloring shader more versatile
When the color passed is transparent black, use
the color from the texture as source, instead of
as mask. This lets use use the coloring program
both for regular and color glyphs, avoiding
program changes in text with Emoji.
Matthias Clasen [Fri, 12 Mar 2021 00:46:15 +0000 (19:46 -0500)]
ngl: Set color as vertex attribute
Instead of using uniforms for color used in multiple
programs, pass it as vertex attributes. This will let
us batch more draw calls, since we don't have to change
uniforms so often. In particular, for syntax-highlighted
text.
Matthias Clasen [Fri, 12 Mar 2021 02:31:31 +0000 (21:31 -0500)]
gsk: Give ngl its own shader sources
We may want to change the interface between the
shaders and the renderer for ngl, and therefore,
sharing the shaders between gl and ngl will not
be practical, going forward.
Matthias Clasen [Fri, 12 Mar 2021 14:06:33 +0000 (14:06 +0000)]
Merge branch 'fix-3704' into 'master'
gdksurface-win32.c: Fix window menu positioning (issue #3704)
Closes #3704
See merge request GNOME/gtk!3286
Emmanuele Bassi [Fri, 12 Mar 2021 11:13:54 +0000 (11:13 +0000)]
build: Install the API references
We are building them, but not installing them.
Emmanuele Bassi [Thu, 11 Mar 2021 17:36:36 +0000 (17:36 +0000)]
docs: Fix the dependencies links
Use the GitLab pages location until we can link to a proper space on
developer.gnome.org.
Chun-wei Fan [Fri, 12 Mar 2021 10:39:04 +0000 (18:39 +0800)]
gdksurface-win32.c: Fix window menu positioning
We ought to get the coordinates of where the window menu should be
displayed using gdk_win32_surface_get_root_coords(), instead of rounding
the position that we obtained with gdk_event_get_position().
Also rename items a bit in the same function, and call
gdk_event_get_event_type() for consistency with the other backends.
Fixes issue #3704.
Changwoo Ryu [Fri, 12 Mar 2021 08:50:28 +0000 (08:50 +0000)]
Update Korean translation
(cherry picked from commit
7774d5d85e86f97d9ef7195c808bcd2d88ef49eb)
Emmanuele Bassi [Thu, 11 Mar 2021 18:40:32 +0000 (18:40 +0000)]
Merge branch 'bilelmoussaoui/shortcuts-annotation' into 'master'
g-i: fix gtk_shortcut_label_new annotation
See merge request GNOME/gtk!3285
Bilal Elmoussaoui [Thu, 11 Mar 2021 18:21:56 +0000 (18:21 +0000)]
g-i: fix gtk_shortcut_label_new annotation
Emmanuele Bassi [Thu, 11 Mar 2021 17:11:57 +0000 (17:11 +0000)]
Merge branch 'ebassi/gidocgen' into 'master'
Move API reference to gi-docgen
See merge request GNOME/gtk!3222
Emmanuele Bassi [Thu, 11 Mar 2021 16:46:02 +0000 (16:46 +0000)]
docs: Add URL maps for cross links
Emmanuele Bassi [Thu, 11 Mar 2021 16:36:48 +0000 (16:36 +0000)]
docs: Enable search
Emmanuele Bassi [Mon, 8 Mar 2021 17:58:14 +0000 (17:58 +0000)]
docs: Update the "running GTK apps" section
Style the content a bit better, and use the appropriate links.
Matthias Clasen [Fri, 5 Mar 2021 17:44:41 +0000 (12:44 -0500)]
Small updates to the coding and documentation style
Mention summary sentences, and a few other things.
Emmanuele Bassi [Fri, 5 Mar 2021 16:44:17 +0000 (16:44 +0000)]
build: Add missing variable definition
Emmanuele Bassi [Fri, 5 Mar 2021 14:37:31 +0000 (14:37 +0000)]
build: Add a GIR dependency to PangoCairo
This is not strictly needed from an introspection perspective, but:
- GTK strictly depends on PangoCairo internally
- we want to integrate the GDK docs with PangoCairo's
So even though we don't have an explicit dependency on PangoCairo types
in our ABI, we do assume that people will be able to use the PangoCairo
API with GTK.
Emmanuele Bassi [Thu, 4 Mar 2021 22:58:05 +0000 (22:58 +0000)]
Handle static inline GtkOrdering function
The introspection scanner does not handle `static inline` functions:
they are not in the shared library, so cannot be dlsym() out of it; and
the `static` keyword tells g-ir-scanner to skip the function declaration
entirely.
We can trick the scanner into thinking the gtk_ordering_from_cmpfunc()
symbol is a real, public one, by declaring and defining a regular
function under the `__GI_SCANNER__` guard; the symbol does not appear
when actually building GTK, or any code using GTK, so we don't risk
collisions.
Emmanuele Bassi [Thu, 4 Mar 2021 17:42:59 +0000 (17:42 +0000)]
docs: Show class hierarchy in the API references
Matthias Clasen [Tue, 2 Mar 2021 16:09:28 +0000 (11:09 -0500)]
label: Fix some external links
I had put in a bunch of [class@Pango.Attribute],
but it needs to be [struct@Pango.Attribute].
Know your dependencies` type hierarchy!
Matthias Clasen [Tue, 2 Mar 2021 16:08:13 +0000 (11:08 -0500)]
text: Fix some copy-paste mishap
A bunch of occurrances of "the self" looked like
absurdist short fiction:
"...the self scrolled off the screen to the left"
Matthias Clasen [Tue, 2 Mar 2021 04:41:04 +0000 (23:41 -0500)]
widget: Fix up some links
Fix up some links to vfuncs and to sections, as well as class methods.
Matthias Clasen [Tue, 2 Mar 2021 03:54:48 +0000 (22:54 -0500)]
shortcuttrigger: Convert docs
Matthias Clasen [Tue, 2 Mar 2021 03:54:37 +0000 (22:54 -0500)]
shortcutlabel: Convert docs
Matthias Clasen [Tue, 2 Mar 2021 03:54:23 +0000 (22:54 -0500)]
shortcutcontroller: Convert docs
Matthias Clasen [Tue, 2 Mar 2021 03:54:11 +0000 (22:54 -0500)]
shortcutaction: Convert docs
Matthias Clasen [Tue, 2 Mar 2021 03:53:57 +0000 (22:53 -0500)]
shortcut: Convert docs
Matthias Clasen [Tue, 2 Mar 2021 03:53:47 +0000 (22:53 -0500)]
sizegroup: Convert docs
Matthias Clasen [Tue, 2 Mar 2021 03:53:25 +0000 (22:53 -0500)]
testutils: Convert docs
Matthias Clasen [Tue, 2 Mar 2021 03:53:00 +0000 (22:53 -0500)]
snapshot: Convert docs
Matthias Clasen [Tue, 2 Mar 2021 03:52:48 +0000 (22:52 -0500)]
tooltip: Convert docs
Matthias Clasen [Tue, 2 Mar 2021 03:52:39 +0000 (22:52 -0500)]
settings: Convert docs
Matthias Clasen [Tue, 2 Mar 2021 03:52:30 +0000 (22:52 -0500)]
recentmanager: Convert docs
Matthias Clasen [Tue, 2 Mar 2021 03:52:20 +0000 (22:52 -0500)]
mountoperation: Convert docs
Matthias Clasen [Tue, 2 Mar 2021 03:51:55 +0000 (22:51 -0500)]
menutrackeritem: Remove SECTION
This is private
Matthias Clasen [Tue, 2 Mar 2021 03:51:38 +0000 (22:51 -0500)]
menutracker: Remove SECTION
This is private.
Matthias Clasen [Tue, 2 Mar 2021 03:51:03 +0000 (22:51 -0500)]
treesortable: Add a summary
Matthias Clasen [Tue, 2 Mar 2021 03:50:53 +0000 (22:50 -0500)]
treeselection: Add a summary
Matthias Clasen [Tue, 2 Mar 2021 03:50:40 +0000 (22:50 -0500)]
treemodelsort: Add a summary
Matthias Clasen [Tue, 2 Mar 2021 03:50:27 +0000 (22:50 -0500)]
treemodelfilter: Add a summary